local sk__biantian = fk.CreateSkill {

  name = "sk__biantian",

  tags = { Skill.Compulsory, },

}



sk__biantian:addEffect(fk.EventPhaseStart, {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(sk__biantian.name) and target ~= player and target.phase == Player.Judge and not target.dead
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:doIndicate(player.id, {target.id})
    local judge = {
      who = target,
      reason = "lightning",
      pattern = ".|2~9|spade",
    }
    room:judge(judge)
    if target.dead then return end
    if judge.card.suit == Card.Spade and judge.card.number > 1 and judge.card.number < 10 then
      room:damage{
        to = target,
        damage = 3,
        damageType = fk.ThunderDamage,
        skillName = "lightning_skill",
      }
    end
  end,
})

return sk__biantian